<template>
  <Header>云锦-诸葛云可视化系统</Header>
  <div>
    <!-- 左侧三个图表容器 -->
    <deviceList/>
    <jiYaJi/>
    <jiaoXianJi/>
    <!-- 右侧三个图表容器 -->
    <tuiHuoLu/>
    <weiLaJi/>
    <rongLianLu/>

    <!--底部-->
    <bDeviceList/>
  </div>
</template>
<script setup lang="ts">
import {onMounted, reactive} from "vue";
import Header from './component/Header.vue'
import weiLaJi from './component/chartscomponents/weilaji.vue'
import rongLianLu from './component/chartscomponents/ronglianlu.vue'
import tuiHuoLu from './component/chartscomponents/tuihuolu.vue'
import deviceList from './component/chartscomponents/devicelist.vue'
import jiYaJi from './component/chartscomponents/jiyaji.vue'
import jiaoXianJi from './component/chartscomponents/jiaoxianji.vue'
import bDeviceList from './component/chartscomponents/bdevicelist.vue'

const state = reactive({
  barOption: {
    width: 300,
    height: 200,
    top: 20,
    left: 20
  },
  pieOption: {
    width: 300,
    height: 200,
    top: 200,
    left: 20
  },
  lineOption: {
    width: 300,
    height: 200,
    top: 400,
    left: 20
  },
  dashboardOption: {
    width: 300,
    height: 200,
    top: 600,
    left: 20
  },
});

onMounted(() => {
  console.log(state)
})

defineOptions({
  name: "Chart"
})
</script>


<style>
body {
  margin: 0;
  background-color: #0a0a1a;
  font-family: 'Arial', sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  color: #00f7ff;
}

#container {
  position: absolute;
  width: 100%;
  height: 100%;
}

.chart-container {
  position: absolute;
  width: 100%;
  height: 40%;
  padding: 10px 0;
  background: rgba(10, 20, 40, 0.6);
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0, 247, 255, 0.3);
  border: 1px solid rgba(0, 247, 255, 0.2);
  overflow: hidden;
  z-index: 10;
  transition: all 0.3s ease;
  animation: float 6s ease-in-out infinite;
}

.chart-container::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg,
  #00f7ff, #00f7ff00, #00f7ff00, #00f7ff);
  background-size: 400%;
  border-radius: 10px;
  z-index: -1;
  opacity: 0.1;
  animation: borderGlow 8s linear infinite;
}

.chart-container:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 0 30px rgba(0, 247, 255, 0.5);
}

#left1 {
  left: 2%;
  top: 4%;
  animation-delay: 0s;
  z-index: 100;
}

#left2 {
  left: 2%;
  top: 35%;
  animation-delay: 0.5s;
  z-index: 100;
}

#left3 {
  left: 2%;
  top: 66%;
  animation-delay: 1s;
  z-index: 100;
}

#right1 {
  right: 2%;
  top: 4%;
  animation-delay: 0.3s;
  z-index: 100;
}

#right2 {
  right: 2%;
  top: 36%;
  animation-delay: 0.8s;
  z-index: 100;
}

#right3 {
  right: 2%;
  top: 67%;
  animation-delay: 1.3s;
  z-index: 100;
}

.chart-title {
  position: absolute;
  top: 10px;
  left: 0;
  right: 0;
  text-align: center;
  font-weight: bold;
  font-size: 16px;
  color: #00f7ff;
  text-shadow: 0 0 10px rgba(0, 247, 255, 0.7);
  letter-spacing: 1px;
  z-index: 2;
}

.chart-value {
  position: absolute;
  bottom: 10px;
  right: 15px;
  font-size: 24px;
  font-weight: bold;
  color: #00f7ff;
  text-shadow: 0 0 10px rgba(0, 247, 255, 0.7);
  z-index: 2;
}

.data-line {
  position: absolute;
  height: 2px;
  background: linear-gradient(90deg, transparent, #00f7ff);
  animation: dataFlow 3s linear infinite;
  opacity: 0.6;
  z-index: 1;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes borderGlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes dataFlow {
  0% {
    width: 0;
    left: 0;
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    width: 100%;
    left: 100%;
    opacity: 0;
  }
}

.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background-color: rgba(0, 247, 255, 0.5);
  border-radius: 50%;
  animation: particleMove linear infinite;
}

@keyframes particleMove {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) translateX(100px);
    opacity: 0;
  }
}

#bottom {
  left: 28%;
  bottom: 10px;
  animation-delay: 1.3s;
  z-index: 100;
}
</style>
